package cultu.community.service;

import org.granite.messaging.service.annotations.RemoteDestination;

import cultu.community.message.Community;
import cultu.community.message.CommunityCriteria;
import cultu.community.message.CommunityList;
import cultu.community.message.CommunityScenario;
import cultu.core.message.Context;

/**
 * The Interface CommunityManager.
 */
@RemoteDestination(id="communityManager",channel="my-amf")
public interface CommunityManager 
{
  
  /**
   * Gets the community.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pCommunity the community
   * @return the community
   */
  Community getCommunity(Context pContext, CommunityScenario pScenario, Community pCommunity);

  /**
   * Creates the community.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pCommunity the community
   * @return the community
   */
  Community createCommunity(Context pContext, CommunityScenario pScenario, Community pCommunity);

  /**
   * Delete community.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pCommunity the community
   * @return the community
   */
  Community deleteCommunity(Context pContext, CommunityScenario pScenario, Community pCommunity);

  /**
   * Update community.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pCommunity the community
   * @return the community
   */
  Community updateCommunity(Context pContext, CommunityScenario pScenario, Community pCommunity);

  /**
   * Find communities.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pCriteria the criteria
   * @return the community list
   */
  CommunityList findCommunities(Context pContext, CommunityScenario pScenario, CommunityCriteria pCriteria);

  /**
   * Delete communities.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pList the list
   * @return the community list
   */
  CommunityList deleteCommunities(Context pContext, CommunityScenario pScenario, CommunityList pList);

  /**
   * Creates the communities.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pList the list
   * @return the community list
   */
  CommunityList createCommunities(Context pContext, CommunityScenario pScenario, CommunityList pList);

  /**
   * Update communities.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pList the list
   * @return the community list
   */
  CommunityList updateCommunities(Context pContext, CommunityScenario pScenario, CommunityList pList);


}
